<template>
    <div>

        <div class="bg_color text-center extension_head">
            <p>团队总人数</p>
            <h3>{{allnum}}</h3>
        </div>
        <van-row class="text-center extension_info">
            <van-col span="12">
                <p>直推人数</p>
                <span>{{secnum}}</span>
            </van-col>
            <van-col span="12">
                <p>总入金量</p>
                <span>{{money}}USD</span>
            </van-col>
        </van-row>

        <div v-for="(item,index) in list" :key="index" class="van-cell">
            <div style="width: 100%;">
                <div>
                    <span>{{item.u_email}}</span>
                </div>
                <div class="flexbox spacebetween font_13 font_sub" style="width: 100%;">
                    <p>状态：<span class="colorO">增加</span></p>
                    <p>数额：<span>{{item.user_two_earnings}}</span></p>
                </div>
                <div class="flexbox spacebetween font_13 font_sub" style="width: 100%;">
                    <p>时间：<span>{{item.u_created_time}}</span></p>
                    <p>币种：<span>美金</span></p>
                </div>
            </div>
        </div>

    </div>
</template>
<script>

    import '@/assets/css/main.css'
    export default {
        data(){
            return{
                list: [],
                allnum: '',
                secnum: '',
                money: '',
            }
        },
        methods: {
            init(){
                var _this = this;

                this.$httpGet('/api/index/Personal_center/extensionuser',{
                    'u_id': window.localStorage.u_id,
                }).then(response => {
                    
                    if(response.code == 200){
                        
                        _this.allnum = response.allnum;
                        _this.secnum = response.secnum;
                        _this.money = response.money;
                        
                        if(response.msg.list){
                            _this.list = _this.list.concat(response.msg.list);
                        }
                        if(response.msg.lista){
                            _this.list = _this.list.concat(response.msg.lista);
                        }
                        if(response.msg.listb){
                            _this.list = _this.list.concat(response.msg.listb);
                        }

                    }else if(response.code == 300){
                        _this.allnum = response.allnum;
                        _this.secnum = response.secnum;
                        _this.money = response.money;
                        _this.list = [];
                    }else{
                        _this.$toast(response.msg);
                    }

                })
            },
        },
        mounted(){
            this.init();
        },
    }
</script>